Stricter check for string value in savehist-printable
authorLeo Liu <sdl.web@gmail.com>
Fri, 9 Mar 2012 18:09:46 +0000 (02:09 +0800)
committerLeo Liu <sdl.web@gmail.com>
Fri, 9 Mar 2012 18:09:46 +0000 (02:09 +0800)
lisp/ChangeLog
lisp/savehist.el

index 7468195cd92fd8b5848bee958b95d001931ae98e..7b9e00782b5084e4ebf8816177fd4b85e879dbf5 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-09  Leo Liu  <sdl.web@gmail.com>
+
+       * savehist.el (savehist-printable): Stricter check for string
+       value (Bug#10937).
+
 2012-03-09  Eli Zaretskii  <eliz@gnu.org>
 
        * mail/smtpmail.el (smtpmail-send-it): Bind
index c1515fa48ce7f1912be6407b3ea903d597ea3e2e..a65906a16765bf811886caaaf4b4bd13e6f79425 100644 (file)
@@ -369,9 +369,11 @@ trimming of history lists to `history-length' items."
   "Return non-nil if VALUE is printable."
   (cond
    ;; Quick response for oft-encountered types known to be printable.
-   ((stringp value))
    ((numberp value))
    ((symbolp value))
+   ;; String without properties
+   ((and (stringp value)
+        (equal-including-properties value (substring-no-properties value))))
    (t
     ;; For others, check explicitly.
     (with-temp-buffer